<!-- 发布文章页 -->
{% extends 'base.html' %}
{% block header %}
    <link rel="stylesheet" href="{{ url_for('static',filename='css/base.css') }}">
    <script src="{{ url_for('static',filename='ckeditor/ckeditor.js') }}"></script>
{% endblock header %}

{% block content %}
    <!-- Main content -->
    <div class="content">

        <div class="row">
            <!-- /.col -->
            <div class="col-md-12">
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active">
                            <a href="{{ url_for('admin.arctype') }}" data-toggle="tab" aria-expanded="true">{{ title }}</a>
                        </li>
                    </ul>

                    <div class="tab-content">
                        <div class="tab-pane active" id="settings">
                <form class="form-horizontal" method="post" action="{{ url_for('admin.addarticle') }}">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">{{ form.title.label }}</label>
                        <div class="col-sm-10">
                            {{ form.title }}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">{{ form.keywords.label }}</label>
                        <div class="col-sm-10">
                            {{ form.keywords }}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">{{ form.typename.label }}</label>
                        <div class="col-sm-10">
                            {{ form.typename }}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">{{ form.content.label }}</label>
                        <div class="col-sm-10">
                            {{ form.content }}
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            {{ form.csrf_token }}
                            {{ form.submit }}
                        </div>
                    </div>
                </form>
            </div>
            <!-- /.box -->

        </div>
        <!-- /.content -->
    </div>
    <!-- /.col -->
            </div>
            </div>
            </div>

    <script type="text/javascript">
        CKEDITOR.replace('content', {
            //
            filebrowserUploadUrl: "{{ url_for('admin.ckupload') }}",
        });
    </script>
    <!-- 表单 -->

{% endblock content %}